package com.ecoolex.chinadutyfree.retailer.entity;

import com.ecoolex.framework.common.annotation.Description;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.lang.NonNull;

public class DirectMailGoodsProductBuyLimitExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected Integer offset;

    protected Integer rows;

    public DirectMailGoodsProductBuyLimitExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public DirectMailGoodsProductBuyLimitExample orderBy(String orderByClause) {
        this.setOrderByClause(orderByClause);
        return this;
    }

    public DirectMailGoodsProductBuyLimitExample orderBy(String ... orderByClauses) {
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < orderByClauses.length; i++) {
            sb.append(orderByClauses[i]);
            if (i < orderByClauses.length - 1) {
                sb.append(" , ");
            }
        }
        this.setOrderByClause(sb.toString());
        return this;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria(this);
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
        rows = null;
        offset = null;
    }

    public static Criteria newAndCreateCriteria() {
        DirectMailGoodsProductBuyLimitExample example = new DirectMailGoodsProductBuyLimitExample();
        return example.createCriteria();
    }

    public DirectMailGoodsProductBuyLimitExample when(boolean condition, IExampleWhen then) {
        if (condition) {
            then.example(this);
        }
        return this;
    }

    public DirectMailGoodsProductBuyLimitExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {
        if (condition) {
            then.example(this);
        } else {
            otherwise.example(this);
        }
        return this;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return this.offset;
    }

    public void setRows(Integer rows) {
        this.rows = rows;
    }

    public Integer getRows() {
        return this.rows;
    }

    public DirectMailGoodsProductBuyLimitExample limit(Integer rows) {
        this.rows = rows;
        return this;
    }

    public DirectMailGoodsProductBuyLimitExample limit(Integer offset, Integer rows) {
        this.offset = offset;
        this.rows = rows;
        return this;
    }

    public DirectMailGoodsProductBuyLimitExample page(Integer page, Integer pageSize) {
        this.offset = page * pageSize;
        this.rows = pageSize;
        return this;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("directmailgoodsproductbuylimit.Id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("directmailgoodsproductbuylimit.Id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.Id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.Id = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.Id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.Id <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.Id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.Id > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.Id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.Id >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.Id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.Id < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.Id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.Id <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("directmailgoodsproductbuylimit.Id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("directmailgoodsproductbuylimit.Id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("directmailgoodsproductbuylimit.Id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("directmailgoodsproductbuylimit.Id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdIsNull() {
            addCriterion("directmailgoodsproductbuylimit.DirectMailProductId is null");
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdIsNotNull() {
            addCriterion("directmailgoodsproductbuylimit.DirectMailProductId is not null");
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.DirectMailProductId =", value, "directMailProductId");
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.DirectMailProductId = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdNotEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.DirectMailProductId <>", value, "directMailProductId");
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdNotEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.DirectMailProductId <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdGreaterThan(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.DirectMailProductId >", value, "directMailProductId");
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdGreaterThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.DirectMailProductId > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.DirectMailProductId >=", value, "directMailProductId");
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdGreaterThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.DirectMailProductId >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdLessThan(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.DirectMailProductId <", value, "directMailProductId");
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdLessThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.DirectMailProductId < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdLessThanOrEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.DirectMailProductId <=", value, "directMailProductId");
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdLessThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.DirectMailProductId <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdIn(List<Integer> values) {
            addCriterion("directmailgoodsproductbuylimit.DirectMailProductId in", values, "directMailProductId");
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdNotIn(List<Integer> values) {
            addCriterion("directmailgoodsproductbuylimit.DirectMailProductId not in", values, "directMailProductId");
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdBetween(Integer value1, Integer value2) {
            addCriterion("directmailgoodsproductbuylimit.DirectMailProductId between", value1, value2, "directMailProductId");
            return (Criteria) this;
        }

        public Criteria andDirectMailProductIdNotBetween(Integer value1, Integer value2) {
            addCriterion("directmailgoodsproductbuylimit.DirectMailProductId not between", value1, value2, "directMailProductId");
            return (Criteria) this;
        }

        public Criteria andSingleNumberIsNull() {
            addCriterion("directmailgoodsproductbuylimit.SingleNumber is null");
            return (Criteria) this;
        }

        public Criteria andSingleNumberIsNotNull() {
            addCriterion("directmailgoodsproductbuylimit.SingleNumber is not null");
            return (Criteria) this;
        }

        public Criteria andSingleNumberEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.SingleNumber =", value, "singleNumber");
            return (Criteria) this;
        }

        public Criteria andSingleNumberEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.SingleNumber = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andSingleNumberNotEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.SingleNumber <>", value, "singleNumber");
            return (Criteria) this;
        }

        public Criteria andSingleNumberNotEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.SingleNumber <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andSingleNumberGreaterThan(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.SingleNumber >", value, "singleNumber");
            return (Criteria) this;
        }

        public Criteria andSingleNumberGreaterThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.SingleNumber > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andSingleNumberGreaterThanOrEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.SingleNumber >=", value, "singleNumber");
            return (Criteria) this;
        }

        public Criteria andSingleNumberGreaterThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.SingleNumber >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andSingleNumberLessThan(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.SingleNumber <", value, "singleNumber");
            return (Criteria) this;
        }

        public Criteria andSingleNumberLessThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.SingleNumber < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andSingleNumberLessThanOrEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.SingleNumber <=", value, "singleNumber");
            return (Criteria) this;
        }

        public Criteria andSingleNumberLessThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.SingleNumber <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andSingleNumberIn(List<Integer> values) {
            addCriterion("directmailgoodsproductbuylimit.SingleNumber in", values, "singleNumber");
            return (Criteria) this;
        }

        public Criteria andSingleNumberNotIn(List<Integer> values) {
            addCriterion("directmailgoodsproductbuylimit.SingleNumber not in", values, "singleNumber");
            return (Criteria) this;
        }

        public Criteria andSingleNumberBetween(Integer value1, Integer value2) {
            addCriterion("directmailgoodsproductbuylimit.SingleNumber between", value1, value2, "singleNumber");
            return (Criteria) this;
        }

        public Criteria andSingleNumberNotBetween(Integer value1, Integer value2) {
            addCriterion("directmailgoodsproductbuylimit.SingleNumber not between", value1, value2, "singleNumber");
            return (Criteria) this;
        }

        public Criteria andNumberIsNull() {
            addCriterion("directmailgoodsproductbuylimit.`Number` is null");
            return (Criteria) this;
        }

        public Criteria andNumberIsNotNull() {
            addCriterion("directmailgoodsproductbuylimit.`Number` is not null");
            return (Criteria) this;
        }

        public Criteria andNumberEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.`Number` =", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.`Number` = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNumberNotEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.`Number` <>", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberNotEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.`Number` <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNumberGreaterThan(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.`Number` >", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberGreaterThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.`Number` > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNumberGreaterThanOrEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.`Number` >=", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberGreaterThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.`Number` >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNumberLessThan(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.`Number` <", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberLessThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.`Number` < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNumberLessThanOrEqualTo(Integer value) {
            addCriterion("directmailgoodsproductbuylimit.`Number` <=", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberLessThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.`Number` <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNumberIn(List<Integer> values) {
            addCriterion("directmailgoodsproductbuylimit.`Number` in", values, "number");
            return (Criteria) this;
        }

        public Criteria andNumberNotIn(List<Integer> values) {
            addCriterion("directmailgoodsproductbuylimit.`Number` not in", values, "number");
            return (Criteria) this;
        }

        public Criteria andNumberBetween(Integer value1, Integer value2) {
            addCriterion("directmailgoodsproductbuylimit.`Number` between", value1, value2, "number");
            return (Criteria) this;
        }

        public Criteria andNumberNotBetween(Integer value1, Integer value2) {
            addCriterion("directmailgoodsproductbuylimit.`Number` not between", value1, value2, "number");
            return (Criteria) this;
        }

        public Criteria andStartTimeIsNull() {
            addCriterion("directmailgoodsproductbuylimit.StartTime is null");
            return (Criteria) this;
        }

        public Criteria andStartTimeIsNotNull() {
            addCriterion("directmailgoodsproductbuylimit.StartTime is not null");
            return (Criteria) this;
        }

        public Criteria andStartTimeEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.StartTime =", value, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.StartTime = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStartTimeNotEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.StartTime <>", value, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeNotEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.StartTime <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStartTimeGreaterThan(Date value) {
            addCriterion("directmailgoodsproductbuylimit.StartTime >", value, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeGreaterThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.StartTime > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStartTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.StartTime >=", value, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeGreaterThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.StartTime >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStartTimeLessThan(Date value) {
            addCriterion("directmailgoodsproductbuylimit.StartTime <", value, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeLessThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.StartTime < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStartTimeLessThanOrEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.StartTime <=", value, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeLessThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.StartTime <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStartTimeIn(List<Date> values) {
            addCriterion("directmailgoodsproductbuylimit.StartTime in", values, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeNotIn(List<Date> values) {
            addCriterion("directmailgoodsproductbuylimit.StartTime not in", values, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeBetween(Date value1, Date value2) {
            addCriterion("directmailgoodsproductbuylimit.StartTime between", value1, value2, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeNotBetween(Date value1, Date value2) {
            addCriterion("directmailgoodsproductbuylimit.StartTime not between", value1, value2, "startTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeIsNull() {
            addCriterion("directmailgoodsproductbuylimit.EndTime is null");
            return (Criteria) this;
        }

        public Criteria andEndTimeIsNotNull() {
            addCriterion("directmailgoodsproductbuylimit.EndTime is not null");
            return (Criteria) this;
        }

        public Criteria andEndTimeEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.EndTime =", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.EndTime = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andEndTimeNotEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.EndTime <>", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeNotEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.EndTime <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andEndTimeGreaterThan(Date value) {
            addCriterion("directmailgoodsproductbuylimit.EndTime >", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeGreaterThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.EndTime > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andEndTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.EndTime >=", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeGreaterThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.EndTime >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andEndTimeLessThan(Date value) {
            addCriterion("directmailgoodsproductbuylimit.EndTime <", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeLessThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.EndTime < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andEndTimeLessThanOrEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.EndTime <=", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeLessThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.EndTime <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andEndTimeIn(List<Date> values) {
            addCriterion("directmailgoodsproductbuylimit.EndTime in", values, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeNotIn(List<Date> values) {
            addCriterion("directmailgoodsproductbuylimit.EndTime not in", values, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeBetween(Date value1, Date value2) {
            addCriterion("directmailgoodsproductbuylimit.EndTime between", value1, value2, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeNotBetween(Date value1, Date value2) {
            addCriterion("directmailgoodsproductbuylimit.EndTime not between", value1, value2, "endTime");
            return (Criteria) this;
        }

        public Criteria andDeletedIsNull() {
            addCriterion("directmailgoodsproductbuylimit.Deleted is null");
            return (Criteria) this;
        }

        public Criteria andDeletedIsNotNull() {
            addCriterion("directmailgoodsproductbuylimit.Deleted is not null");
            return (Criteria) this;
        }

        public Criteria andDeletedEqualTo(Boolean value) {
            addCriterion("directmailgoodsproductbuylimit.Deleted =", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.Deleted = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedNotEqualTo(Boolean value) {
            addCriterion("directmailgoodsproductbuylimit.Deleted <>", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.Deleted <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThan(Boolean value) {
            addCriterion("directmailgoodsproductbuylimit.Deleted >", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.Deleted > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanOrEqualTo(Boolean value) {
            addCriterion("directmailgoodsproductbuylimit.Deleted >=", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.Deleted >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedLessThan(Boolean value) {
            addCriterion("directmailgoodsproductbuylimit.Deleted <", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.Deleted < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanOrEqualTo(Boolean value) {
            addCriterion("directmailgoodsproductbuylimit.Deleted <=", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.Deleted <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedIn(List<Boolean> values) {
            addCriterion("directmailgoodsproductbuylimit.Deleted in", values, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotIn(List<Boolean> values) {
            addCriterion("directmailgoodsproductbuylimit.Deleted not in", values, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedBetween(Boolean value1, Boolean value2) {
            addCriterion("directmailgoodsproductbuylimit.Deleted between", value1, value2, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotBetween(Boolean value1, Boolean value2) {
            addCriterion("directmailgoodsproductbuylimit.Deleted not between", value1, value2, "deleted");
            return (Criteria) this;
        }

        public Criteria andCreateUserIsNull() {
            addCriterion("directmailgoodsproductbuylimit.`CreateUser` is null");
            return (Criteria) this;
        }

        public Criteria andCreateUserIsNotNull() {
            addCriterion("directmailgoodsproductbuylimit.`CreateUser` is not null");
            return (Criteria) this;
        }

        public Criteria andCreateUserEqualTo(String value) {
            addCriterion("directmailgoodsproductbuylimit.`CreateUser` =", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.`CreateUser` = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserNotEqualTo(String value) {
            addCriterion("directmailgoodsproductbuylimit.`CreateUser` <>", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.`CreateUser` <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThan(String value) {
            addCriterion("directmailgoodsproductbuylimit.`CreateUser` >", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.`CreateUser` > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
            addCriterion("directmailgoodsproductbuylimit.`CreateUser` >=", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.`CreateUser` >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThan(String value) {
            addCriterion("directmailgoodsproductbuylimit.`CreateUser` <", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.`CreateUser` < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanOrEqualTo(String value) {
            addCriterion("directmailgoodsproductbuylimit.`CreateUser` <=", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.`CreateUser` <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLike(String value) {
            addCriterion("directmailgoodsproductbuylimit.`CreateUser` like", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotLike(String value) {
            addCriterion("directmailgoodsproductbuylimit.`CreateUser` not like", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserIn(List<String> values) {
            addCriterion("directmailgoodsproductbuylimit.`CreateUser` in", values, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotIn(List<String> values) {
            addCriterion("directmailgoodsproductbuylimit.`CreateUser` not in", values, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserBetween(String value1, String value2) {
            addCriterion("directmailgoodsproductbuylimit.`CreateUser` between", value1, value2, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotBetween(String value1, String value2) {
            addCriterion("directmailgoodsproductbuylimit.`CreateUser` not between", value1, value2, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("directmailgoodsproductbuylimit.CreateTime is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("directmailgoodsproductbuylimit.CreateTime is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.CreateTime =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.CreateTime = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.CreateTime <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.CreateTime <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("directmailgoodsproductbuylimit.CreateTime >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.CreateTime > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.CreateTime >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.CreateTime >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("directmailgoodsproductbuylimit.CreateTime <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.CreateTime < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.CreateTime <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.CreateTime <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("directmailgoodsproductbuylimit.CreateTime in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("directmailgoodsproductbuylimit.CreateTime not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("directmailgoodsproductbuylimit.CreateTime between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("directmailgoodsproductbuylimit.CreateTime not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIsNull() {
            addCriterion("directmailgoodsproductbuylimit.UpdateUser is null");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIsNotNull() {
            addCriterion("directmailgoodsproductbuylimit.UpdateUser is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateUserEqualTo(String value) {
            addCriterion("directmailgoodsproductbuylimit.UpdateUser =", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.UpdateUser = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotEqualTo(String value) {
            addCriterion("directmailgoodsproductbuylimit.UpdateUser <>", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.UpdateUser <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThan(String value) {
            addCriterion("directmailgoodsproductbuylimit.UpdateUser >", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.UpdateUser > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanOrEqualTo(String value) {
            addCriterion("directmailgoodsproductbuylimit.UpdateUser >=", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.UpdateUser >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThan(String value) {
            addCriterion("directmailgoodsproductbuylimit.UpdateUser <", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.UpdateUser < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanOrEqualTo(String value) {
            addCriterion("directmailgoodsproductbuylimit.UpdateUser <=", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.UpdateUser <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLike(String value) {
            addCriterion("directmailgoodsproductbuylimit.UpdateUser like", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotLike(String value) {
            addCriterion("directmailgoodsproductbuylimit.UpdateUser not like", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIn(List<String> values) {
            addCriterion("directmailgoodsproductbuylimit.UpdateUser in", values, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotIn(List<String> values) {
            addCriterion("directmailgoodsproductbuylimit.UpdateUser not in", values, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserBetween(String value1, String value2) {
            addCriterion("directmailgoodsproductbuylimit.UpdateUser between", value1, value2, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotBetween(String value1, String value2) {
            addCriterion("directmailgoodsproductbuylimit.UpdateUser not between", value1, value2, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNull() {
            addCriterion("directmailgoodsproductbuylimit.UpdateTime is null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNotNull() {
            addCriterion("directmailgoodsproductbuylimit.UpdateTime is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.UpdateTime =", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.UpdateTime = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.UpdateTime <>", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.UpdateTime <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThan(Date value) {
            addCriterion("directmailgoodsproductbuylimit.UpdateTime >", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.UpdateTime > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.UpdateTime >=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.UpdateTime >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThan(Date value) {
            addCriterion("directmailgoodsproductbuylimit.UpdateTime <", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.UpdateTime < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
            addCriterion("directmailgoodsproductbuylimit.UpdateTime <=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualToColumn(DirectMailGoodsProductBuyLimit.Column column) {
            addCriterion(new StringBuilder("directmailgoodsproductbuylimit.UpdateTime <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIn(List<Date> values) {
            addCriterion("directmailgoodsproductbuylimit.UpdateTime in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotIn(List<Date> values) {
            addCriterion("directmailgoodsproductbuylimit.UpdateTime not in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
            addCriterion("directmailgoodsproductbuylimit.UpdateTime between", value1, value2, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
            addCriterion("directmailgoodsproductbuylimit.UpdateTime not between", value1, value2, "updateTime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        private DirectMailGoodsProductBuyLimitExample example;

        protected Criteria(DirectMailGoodsProductBuyLimitExample example) {
            super();
            this.example = example;
        }

        public DirectMailGoodsProductBuyLimitExample example() {
            return this.example;
        }

        @Deprecated
        public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
            if (ifAdd) {
                add.add(this);
            }
            return this;
        }

        public Criteria when(boolean condition, ICriteriaWhen then) {
            if (condition) {
                then.criteria(this);
            }
            return this;
        }

        public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) {
            if (condition) {
                then.criteria(this);
            } else {
                otherwise.criteria(this);
            }
            return this;
        }

        public Criteria andLogicalDeleted(boolean deleted) {
            return deleted ? andDeletedEqualTo(DirectMailGoodsProductBuyLimit.Deleted.IS_DELETED.value()) : andDeletedNotEqualTo(DirectMailGoodsProductBuyLimit.Deleted.IS_DELETED.value());
        }

        @Deprecated
        public interface ICriteriaAdd {
            Criteria add(Criteria add);
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }

    public interface ICriteriaWhen {
        void criteria(Criteria criteria);
    }

    public interface IExampleWhen {
        void example(com.ecoolex.chinadutyfree.retailer.entity.DirectMailGoodsProductBuyLimitExample example);
    }
}